﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/Member.Master" AutoEventWireup="true"
    CodeBehind="PODetail.aspx.cs" Inherits="VPNNew.PODetail" Theme="Default" %>

<asp:Content ID="Content7" ContentPlaceHolderID="Center" runat="server">
    <asp:DetailsView ID="dvPO" runat="server" AutoGenerateRows="False" GridLines="None"
        EnableModelValidation="True" CellPadding="5">
        <FieldHeaderStyle BackColor="#024978" BorderColor="White" BorderStyle="Solid" BorderWidth="2px"
            Font-Bold="True" ForeColor="White" Width="60px" />
        <Fields>
            <asp:BoundField HeaderText="[[PONumber]]" DataField="PONumber"></asp:BoundField>
            <asp:TemplateField HeaderText="[[ProductName]]">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" Target="_blank" NavigateUrl='<%#string.Format("~/Product.aspx?ProductID={0}", ((VPN.DataContext.PO)Container.DataItem).Product.ProductID) %>'
                        Text=""><%# ((VPN.DataContext.PO)Container.DataItem).Product.Name%></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="[[AssosiatedAccount]]">
                <ItemTemplate>
                    <%#((VPN.DataContext.PO)Container.DataItem).Account.AccountName %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="[[POStatus]]">
                <ItemTemplate>
                    <%# string.Format("[[{0}]]",Enum.GetName(typeof(VPN.Manage.POStatus), Eval("Status"))) %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="CreateDate" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}"
                HeaderText="[[CreateDate]]" />
            <asp:BoundField DataField="LastModifyDate" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}"
                HeaderText="[[LastModifyDate]]" />
            <asp:TemplateField HeaderText="[[Price]]">
                <ItemTemplate>
                    <%# ((VPN.DataContext.PO)Container.DataItem).Product.Price.ToString("￥0.00")%>
                </ItemTemplate>
            </asp:TemplateField>
        </Fields>
    </asp:DetailsView>
    <p>
        <asp:Button ID="btnPay" runat="server" Text="[[PayNow]]" OnClick="btnPay_Click" />
        <asp:Button ID="btnCancel" runat="server" Text="[[Cancel]]" OnClick="btnCancel_Click" />
    </p>
</asp:Content>
